home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ddj9304.zip / WAVELET.ZIP / ANALYZER.L < prev    next >
Text File  |  1992-04-17  |  13KB  |  236 lines

  1.  
  2. Creation date: Fri Apr 17 11:36:20 1992    analyzer.s    page 1
  3.  
  4.  
  5. Address    Instruction    Line #    Source line
  6.             1    #include "dsp_type.h"
  7.             1    #define DSP32 1
  8.             2    #if DSP32
  9.             3    #include "dspregs.h"
  10.             1    /* dspregs.h */
  11.             2    /* register file redefinition */
  12.             3    #define  r1e   r1
  13.             4    #define  r2e   r2
  14.             5    #define  r3e   r3
  15.             6    #define  r4e   r4
  16.             7    #define  r5e   r5
  17.             8    #define  r6e   r6
  18.             9    #define  r7e   r7
  19.             10    #define  r8e   r8
  20.             11    #define  r9e   r9
  21.             12    #define  r10e  r10
  22.             13    #define  r11e  r11
  23.             14    #define  r12e  r12
  24.             15    #define  r13e  r13
  25.             16    #define  r14e  r14
  26.             17    #define  r15e  r15
  27.             18    #define  r16e  r16
  28.             19    #define  r17e  r17
  29.             20    #define  r18e  r18
  30.             21    #define  r19e  r19
  31.             22    #define  r20e  r20
  32.             23    #define  r21e  r21
  33.             24    
  34.             25    /* integer and float redefinition */
  35.             26    #define  int24  int
  36.             27    #define  float24  float
  37.             4    #endif
  38.             5    
  39.             6    .extern DECOMP, DRAWIMAG
  40.             7    .extern WAVEADRS, WAVELVLS, IMAGSHOW, LVLADDRS
  41.             8    .extern SIG_DRAW, DRAW_CNT, H_FILTER, L_FILTER
  42.             9    .extern RST_DATA, IM0_PTRS, IM1_PTRS, IMAGE_0
  43.             10    .extern STACKEND, SIGNALIN, DATA_OUT
  44.             11    
  45.             12            /*  ANALYZER
  46.             13                main control program for the wavelet analyzer
  47.             14                registers used: r1 r2 r3 r4 r5 r6 r8 r9
  48.             15                                r11 r12 r13 r14 r15 r16 r17
  49.             16                accumulators used: a0 a1 a2 a3
  50.             17            */
  51.             18    .rsect ".bank0"
  52. 0000    17400000    19              dauc = 0x0000;  /* initialize DAU formats */
  53. 0004    14200000    20              r1e = WAVELVLS; /* point to jump address for wavelet filter size */
  54. 0008    14400000    21              r2e = SIGNALIN; /* point to approximation data storage */
  55. 000c    1ea30037    22              r3 = *r1++;     /* load number of levels in wavelet transform */
  56. 0010    14800008    23              r4 = 8;         /* load number of unit intervals per image */
  57. 0014    14210002    24              r1e = r1 + 2;   /* point to the unit interval count storage */
  58. 0018    1fa40037    25              *r1++ = r4;     /* store the unit interval count value */
  59. 001c    18840080    26              r4 = r4 - r4;   /* zero the register */
  60. 0020    1fa40037    27              *r1++ = r4;     /* set active image flag storage to 0 (IMAGE 0) */
  61. 0024    34e0c187    28              a3 = a3 - a3;   /* intial data value is zero */
  62.             32    #else
  63. 0028    1a830002    33              r3 = r3 - 2;    /* number of levels in wavelet transform - 2 */
  64.             34    #endif
  65. 002c    1fa20037    35    INITAPPX: *r1++ = r2e;   /* store base address of each approximation level */
  66.  
  67.  
  68. Creation date: Fri Apr 17 11:36:21 199    analyzer.s    page 2
  69.  
  70.  
  71. Address    Instruction    Line #    Source line
  72. 0030    30600197    36              *r2++ = a3 = a3; /* zero storage for approximation level */
  73. 0034    30600197    37              *r2++ = a3 = a3; /* r2 ends up pointing to first location .... */
  74. 0038    30600197    38              *r2++ = a3 = a3; /* in the next approximation level */
  75. 003c    30600197    39              *r2++ = a3 = a3;
  76. 0040    30600197    40              *r2++ = a3 = a3;
  77. 0044    30600197    41              *r2++ = a3 = a3;
  78.             55    #else
  79. 0048    0c60002c    56              if (r3-- >=0) goto INITAPPX; /* repeat for all arrays */
  80. 004c    1fa20037    57              *r1++ = r2e;   /* store the next location */
  81. 0050    17600987    58              ioc = 0x0987;  /* initialize the serial I/O to the codec */
  82. 0054    14200000    59              r1 = RST_DATA; /* point to reset pointer initialization storage */
  83. 0058    14400000    60              r2 = SIG_DRAW; /* point to signal drawing data storage */
  84. 005c    1460001a    61              r3 = 26;       /* integer pointer index, 2 bytes per pointer */
  85. 0060    14420016    62              r2 = r2 + 22;  /* point to bit pointer storage */
  86. 0064    14800006    63              r4 = 6;        /* initialize loop counter for eight loops */
  87. 0068    1ea50037    64    INIT_PTR: r5 = *r1++;    /* load initial bit pointer */
  88. 006c    1ea60037    65              r6 = *r1++;    /* load initial byte column pointer */
  89. 0070    1fa50057    66              *r2++ = r5;    /* store initial bit pointer */
  90. 0074    0c800068    67              if (r4-- >=0) goto INIT_PTR; /* repeat for all pointers */
  91. 0078    1fa60043    68              *r2++r3 = r6;  /* store initial byte column pointer */
  92.             69    #endif
  93. 007c    15800000    70              r12e = WAVEADRS; /* load pointer to filter jump address */
  94. 0080    15a00000    71              r13e = STACKEND; /* load pointer to top of stack memory */
  95. 0084    1eab0197    72              r11e = *r12++;   /* load jump address for filter size */
  96. 0088    1eb20197    73              r16e = *r12++;   /* load coefficient pointer wrap back index */
  97. 008c    1eb30197    74              r17 = *r12++;    /* load number of levels */
  98. 0090    1eb10190    75              r15 = *r12;      /* load image data space size / 4 */
  99. 0094    14600000    76              r3e = IMAGE_0;   /* point to the detail level float output */
  100.             81    #else
  101. 0098    1a910002    82              r15 = r15 - 2;   /* number of data points minus two */
  102. 009c    0e20009c    83    CLR_IMAG: if (r15-- >=0) goto CLR_IMAG; /* repeat until all image cleared */
  103. 00a0    3060019f    84              *r3++ = a3 = a3; /* clear four bytes in IMAGE_0 array */
  104.             85    #endif
  105. 00a4    00200188    86              goto ENTRY_PT;   /* jump to the entry point */
  106. 00a8    00000000    87              nop;
  107.             88    
  108. 00ac    15000000    89    MAINLOOP: r8 = DATA_OUT;        /* point to output data array */
  109. 00b0    15800000    90              r12e = SIG_DRAW;      /* point to signal drawing data sets */
  110. 00b4    15200000    91              r9e = DRAW_CNT;       /* point to draw count array */
  111. 00b8    30002387    92              a0 = *r8++;           /* load first signal data point */
  112. 00bc    18090220    93              r9e = r9 + r15;       /* index into draw count array */
  113. 00c0    11c00000    94              call DRAWIMAG (r14);  /* draw the first input sample point */
  114. 00c4    1e690130    95              r9l = *r9;            /* load the draw loop counter */
  115. 00c8    15800000    96              r12e = SIG_DRAW;      /* point to signal drawing data sets */
  116. 00cc    042000f4    97    DRWLOOP1: if (ibf) goto SAMPL_IN; /* if true, next sample available */
  117. 00d0    00000000    98              nop;
  118. 00d4    30002387    99              a0 = *r8++;           /* load data point */
  119. 00d8    11c00000    100              call DRAWIMAG (r14);  /* draw data point */
  120. 00dc    00000000    101              nop;
  121. 00e0    0d2000cc    102              if (r9-- >= 0) goto DRWLOOP1; /* repeat for all levels of xfrm */
  122.             105    #else
  123. 00e4    158c0002    106              r12 = r12 + 2;        /* point to data set for next level */
  124.             107    #endif
  125. 00e8    040000e8    108    WAITIBF1: if (ibe) goto WAITIBF1; /* wait until next data sample arrives */
  126. 00ec    00000000    109              nop;
  127. 00f0    0020010c    110              goto TEST_LVL;
  128. 00f4    79600207    111    SAMPL_IN: a3 = float(ibuf);      /* load the new signal sample */
  129. 00f8    30002387    112    DRWLOOP2: a0 = *r8++;            /* load data point */
  130. 00fc    11c00000    113              call DRAWIMAG (r14);   /* draw data point */
  131. 0100    00000000    114              nop;
  132.  
  133.  
  134. Creation date: Fri Apr 17 11:36:23 199    analyzer.s    page 3
  135.  
  136.  
  137. Address    Instruction    Line #    Source line
  138. 0104    0d2000f8    115              if (r9-- >= 0) goto DRWLOOP2;
  139.             118    #else
  140. 0108    158c0002    119              r12 = r12 + 2;         /* point to data set for next level */
  141.             120    #endif
  142. 010c    1af10000    121    TEST_LVL: r15 - 0;               /* test for process of all levels */
  143. 0110    00800188    122              if (ne) goto ENTRY_PT; /* if true, all levels have not been done */
  144. 0114    15800000    123              r12e = IMAGSHOW;       /* point to the unit interval count down */
  145. 0118    00000000    124              nop;
  146. 011c    1ea30197    125              r3 = *r12++;           /* load the unit interval count down */
  147. 0120    1ea40196    126              r4 = *r12--;           /* load the image draw flag */
  148. 0124    1a830001    127              r3 = r3 - 1;           /* decrement the unit interval count */
  149. 0128    00800188    128              if (ne) goto ENTRY_PT; /* if true, not done with new data set */
  150. 012c    1fa30197    129              *r12++ = r3;           /* save the new count */
  151. 0130    14600008    130              r3 = 8;                /* reset count to eight unit intervals */
  152. 0134    1a8c0002    131              r12 = r12 - 2;         /* point to unit interval count storage */
  153. 0138    1fa30197    132              *r12++ = r3;           /* save the reset count */
  154. 013c    1f840016    133              pir = r4;              /* interrupt host processor for new image */
  155. 0140    14840000    134              r4 = r4;               /* tickle CAU flags for image set */
  156. 0144    00800158    135              if (ne) goto IM0_NEXT; /* if true, set up for drawing on IMAGE 0 */
  157. 0148    00000000    136              nop;
  158. 014c    14800001    137              r4 = 1;                /* next image displayed is IMAGE 1 */
  159. 0150    00200160    138              goto PNTRINIT;         /* go to image pointer initialization */
  160. 0154    14400000    139              r2e = IM1_PTRS;        /* set up for drawing on IMAGE 1 */
  161.             140    
  162. 0158    14800000    141    IM0_NEXT: r4 = 0;          /* next image displayed is IMAGE 0 */
  163. 015c    14400000    142              r2e = IM0_PTRS;  /* set up for drawing on IMAGE 0 */
  164. 0160    14200000    143    PNTRINIT: r1 = SIG_DRAW;   /* point to signal drawing data sets */
  165. 0164    1fa40197    144              *r12++ = r4;     /* save the image draw flag */
  166. 0168    14210018    145              r1e = r1 + 24;   /* point to byte column pointer storage */
  167.             150    #else
  168. 016c    1460001c    151              r3 = 28;         /* set up post increment value */
  169. 0170    14800006    152              r4 = 6;          /* set up loop counter for eight iterations */
  170. 0174    1ea50057    153    REINIPTR: r5 = *r2++;      /* load image array pointer */
  171. 0178    0c800174    154              if (r4-- >= 0) goto REINIPTR; /* repeat for all pointers */
  172. 017c    1fa50023    155              *r1++r3 = r5;    /* store image array pointer */
  173.             156    #endif
  174. 0180    04e00180    157    WAIT_PIE: if (pif) goto WAIT_PIE; /* wait for pif flag to be cleared */
  175. 0184    00000000    158              nop;
  176. 0188    14600000    159    ENTRY_PT: r3e = SIGNALIN;           /* point to input signal storage array */
  177. 018c    0400018c    160    WAITIBF2: if (ibe) goto WAITIBF2;   /* wait until next data sample arrives */
  178. 0190    16330000    161              r15 = r17;                /* inititialize the recursion counter */
  179. 0194    7940021f    162              *r3++ = a2 = float(ibuf); /* output second data sample first */
  180. 0198    14c00000    163              r6e = DATA_OUT;    /* point to output data array */
  181. 019c    30600198    164              *r3 = a3 = a3;     /* output first data sample last */
  182. 01a0    306001b7    165              *r6++ = a3 = a3;   /* place first sample in data output array */
  183. 01a4    30400137    166              *r6++ = a2 = a2;   /* place second sample in data output array */
  184. 01a8    14200000    167              r1e = H_FILTER;    /* point to detail filter coefficients */
  185. 01ac    14400000    168              r2e = L_FILTER;    /* point to approx. filter coefficients */
  186. 01b0    15800000    169              r12e = LVLADDRS;   /* point to data level address pointers */
  187. 01b4    34800007    170              a0 = a0 - a0;      /* zero the accumulators */
  188. 01b8    11c00000    171              call DECOMP (r14); /* start the recursive decomposition */
  189. 01bc    30200007    172              a1 = a0;
  190. 01c0    002000ac    173              goto MAINLOOP;
  191. 01c4    00000000    174              nop;
  192.  
  193.  
  194. d3as:warning:analyzer.s line 84: Use output pointer reg only as output pointer 
  195.         in DAU inst at dest after branch instruction
  196. d3as:warning:analyzer.s line 95: branch dest can't start with inst referencing 
  197.         reg being loaded
  198.  
  199.  
  200.  
  201. Symbol Table
  202. .file    analyzer.s
  203. .bank0    (section 1)    size 0x1c8
  204. CLR_IMAG    section 1    defined    value 0x9c
  205. TEST_LVL    section 1    defined    value 0x10c
  206. DATA_OUT    section 255    external    value 0x0
  207. SIGNALIN    section 255    external    value 0x0
  208. STACKEND    section 255    external    value 0x0
  209. IMAGSHOW    section 255    external    value 0x0
  210. IM0_PTRS    section 255    external    value 0x0
  211. H_FILTER    section 255    external    value 0x0
  212. IM0_NEXT    section 1    defined    value 0x158
  213. DECOMP    section 255    external    value 0x0
  214. SAMPL_IN    section 1    defined    value 0xf4
  215. WAITIBF1    section 1    defined    value 0xe8
  216. WAVEADRS    section 255    external    value 0x0
  217. WAITIBF2    section 1    defined    value 0x18c
  218. REINIPTR    section 1    defined    value 0x174
  219. RST_DATA    section 255    external    value 0x0
  220. ENTRY_PT    section 1    defined    value 0x188
  221. WAVELVLS    section 255    external    value 0x0
  222. DRAWIMAG    section 255    external    value 0x0
  223. INITAPPX    section 1    defined    value 0x2c
  224. LVLADDRS    section 255    external    value 0x0
  225. WAIT_PIE    section 1    defined    value 0x180
  226. DRWLOOP1    section 1    defined    value 0xcc
  227. DRWLOOP2    section 1    defined    value 0xf8
  228. PNTRINIT    section 1    defined    value 0x160
  229. IMAGE_0    section 255    external    value 0x0
  230. MAINLOOP    section 1    defined    value 0xac
  231. IM1_PTRS    section 255    external    value 0x0
  232. DRAW_CNT    section 255    external    value 0x0
  233. SIG_DRAW    section 255    external    value 0x0
  234. INIT_PTR    section 1    defined    value 0x68
  235. L_FILTER    section 255    external    value 0x0
  236.